<!DOCTYPE html>
<html>
<head>
    <title>我的游记</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <script src="/js/plugins/jrender/jrender.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/plugins/dialog/dialog.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/userTravels.css"/>
    <link rel="stylesheet" href="/js/plugins/dialog/dialog.css"/>
    <script src="/js/plugins/dialog/dialog.min.js"></script>
    <script src="js/common.js"></script>
    <script>

        $(function () {
            var keyword = getParams().keyword;
            var key=decodeURI(keyword);
            $.get("/hotels", {keyword: key}, function (data) {
                console.log(data);
                //接下来就是渲染数据了
                       $(".travels").renderValues({list: data}, {
                           handle: function (ele, value) {
                               ele.href = "/hotelContent.html?id=" + value;
                           }
                       })
                   });
        })
    </script>
</head>

<body>
    <div class="search-head">
        <div class="row nav-search">
            <div class="col">
                <a href="hotelPage.html">
                    <span><i class="fa fa-chevron-left"></i></span>
                </a>
            </div>
            <div class="col">
                <span>酒店分类</span>
            </div>
            <div class="col"></div>
        </div>
    </div>

    <div class="container travels">
        <dl class="list" render-loop="list">
            <dd>
                <!--a标签用函数渲染-->
                <a  render-key="list.id" render-fun="handle">
                    <img render-src="list.coverUrl">
                    <h6 class="title" render-html="list.title"></h6>
                    <p>
                        <span class="span-right">
                        <!--<i class="fa fa-thumbs-o-up"></i><span>0</span>点赞</span>-->
                    </p>
                </a>
            </dd>
        </dl>
    </div>
</body>

</html>
